package com.agent.web;

import com.agent.service.impl.ScheduleDept;
import com.agent.service.impl.ScheduleUser;
import com.agent.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created by hg on 2019/1/10.
 */
@RequestMapping(value = "/schedule")
@RestController
public class ScheduleController {

    @Autowired
    ScheduleUser scheduleUser;

    @Autowired
    ScheduleDept scheduleDept;

    @RequestMapping(value = "/user" ,method = RequestMethod.GET)
    public Map<String,Object> scheduleUser(){
        scheduleUser.execute();
        return ResponseData.getSuccessResult();
    }


    @RequestMapping(value = "/dept" ,method = RequestMethod.GET)
    public Map<String,Object> scheduleDept(){
        scheduleDept.execute();
        return ResponseData.getSuccessResult();
    }


}
